- If the LO has been measured
Loop over the elements in the RF Attenuation List
Loop over the elements in the Baseband Attenuation List
- If we've written less than 0x40 gain values
Take the current Baseband Attenuation List value, left shift by 8
- If the Radio Revision is 8
- Bitwise OR the previous value with 0x50
- Otherwise
- Bitwise OR the previous value with 0x40
Bitwise OR the result of the last operation with the current RF Attenuation List value
Write the resulting value to PHYRegister 0x3C0 + the number of gain values written already
- If we've written less than 0x40 gain values
Otherwise, write 0 to PHYRegister 0x3FF